
#include "Lesson_4.h"

GLboolean Lesson_4(GLvoid)
{
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	
	glLoadIdentity();  
	glTranslatef(-1.5, 0.0, -6.0);

	glRotatef(g_TriangleRotate, 0.0f, 1.0f, 0.0f);

	glBegin(GL_TRIANGLES);
	glColor3f(1.0f, 0.0f, 0.0f);
	glVertex3d(0.0f, 1.0f, 0.0f);
	glColor3f(0.0f, 1.0f, 0.0f);
	glVertex3d(-1.0f, -1.0f, 0.0f);
	glColor3f(0.0f, 0.0f, 1.0f);
	glVertex3d(0.5f, -0.5f, 0.0f);	
	glEnd();



	glLoadIdentity();
	glTranslatef(1.5, 0.0, -6.0);
	glColor3f(0.0f, 0.0f, 1.0f);

	glRotatef(g_QuadsRotate, 1.0f, 0.0f, 0.0f);

	glBegin(GL_QUADS);
	glVertex3d(-1.0f, 1.0f, 0.0f);	
	glVertex3d(1.0f, 1.0f, 0.0f);	
	glVertex3d(1.0f, -1.0f, 0.0f);	
	glVertex3d(-1.0f, -1.0f, 0.0f);	

	glEnd();


	g_TriangleRotate += 0.002f;
	g_QuadsRotate -= 0.0015f;

	return true;
}